/*
 * Complex.h
 *
 *  Created on: Aug 26, 2009
 *      Author: asus
 */

#ifndef COMPLEX_H_
#define COMPLEX_H_

/**
 * Complex class contains real part and imaginary part. Also operator +, -, *, and == for Complex type
 */
class Complex {
public:
	Complex();
	Complex(double realPart);
	Complex(double realPart, double imaginaryPart);
	virtual ~Complex();
	Complex i() const;
	double getReal();
	double getImaginary();
	friend const Complex operator +(const Complex& num1, const Complex& num2);
	friend const Complex operator -(const Complex& num1, const Complex& num2);
	friend const Complex operator *(const Complex& num1, const Complex& num2);
	friend const bool operator ==(const Complex& num1, const Complex& num2);
private:
	/** real part */
	double real;
	/** imaginary part */
	double imaginary;
};

#endif /* COMPLEX_H_ */
